﻿
using System;

namespace jSLApp.Web
{
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using Microsoft.ServiceModel.DomainServices.LinqToSql;
    using Workflow;


    // Implements application logic using the DB context.
    // TODO: Add your application logic to these methods or in additional methods.
    // TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
    // Also consider adding roles to restrict access as appropriate.
    // [RequiresAuthentication]
    [EnableClientAccess()]
    public class MainDomainService : LinqToSqlDomainService<DB>
    {
        public IQueryable<User> GetUsers()
        {
            return this.DataContext.Users;
        }

        public User GetFirstUser()
        {
            return this.DataContext.Users.First();
        }

        public Permission GetPermission()
        {
            throw new NotImplementedException("Dont call this method");
        }
    }
}


